package com.cc.alltype.wechat;

import java.io.Serializable;

/**
 * 请求微信服务器用于兑换带有场景值的二维码的ticket
 * 响应来的模型，见官方文档 https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Generating_a_Parametric_QR_Code.html
 * @author chanchaw
 * @create 2024-11-27 8:47
 */

public class SceneQRTicketRes implements Serializable {
    private static final long serialVersionUID = 1L;
    private String ticket;// 获取的二维码ticket，凭借此ticket可以在有效时间内换取二维码。
    private Integer expire_seconds;// 该二维码有效时间，以秒为单位。 最大不超过2592000（即30天）。
    private String url;// 二维码图片解析后的地址，开发者可根据该地址自行生成需要的二维码图片
    private Integer errcode;// 微信服务器返回的错误码
    private String errmsg;// 错误描述

    public String getTicket() {
        return ticket;
    }

    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    public Integer getExpire_seconds() {
        return expire_seconds;
    }

    public void setExpire_seconds(Integer expire_seconds) {
        this.expire_seconds = expire_seconds;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getErrcode() {
        return errcode;
    }

    public void setErrcode(Integer errcode) {
        this.errcode = errcode;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }

    @Override
    public String toString() {
        return "SceneQRTicketRes{" +
                "ticket='" + ticket + '\'' +
                ", expire_seconds=" + expire_seconds +
                ", url='" + url + '\'' +
                ", errcode=" + errcode +
                ", errmsg='" + errmsg + '\'' +
                '}';
    }

    public SceneQRTicketRes() {
    }

    public SceneQRTicketRes(String ticket, Integer expire_seconds, String url, Integer errcode, String errmsg) {
        this.ticket = ticket;
        this.expire_seconds = expire_seconds;
        this.url = url;
        this.errcode = errcode;
        this.errmsg = errmsg;
    }
}
